<template>
	<view class="container">
		<!-- Logo区域 -->
		<view class="logo-area">
			<image class="logo" src="/static/logo.png" mode="aspectFit"></image>
			<!-- <text class="app-name">脑卒中预防</text> -->
			<text class="app-name">智能手环</text>
			<text class="slogan">关注健康，预防脑卒中</text>
		</view>
		
		<!-- 版权信息 -->
		<view class="copyright">
			<text>Copyright © 2024</text>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad() {
			// 检查是否已登录
			const token = uni.getStorageSync('token')
			
			// 延迟2秒后跳转
			setTimeout(() => {
				if (token) {
					// 已登录，跳转到首页
					uni.reLaunch({
						url: '/pages/index/index'
					})
				} else {
					// 未登录，跳转到登录页
					uni.reLaunch({
						url: '/pages/login/login'
					})
				}
			}, 2000)
		}
	}
</script>

<style lang="scss">
	.container {
		min-height: 100vh;
		background-color: #fff;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		
		.logo-area {
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			
			.logo {
				width: 200rpx;
				height: 200rpx;
				margin-bottom: 40rpx;
			}
			
			.app-name {
				font-size: 48rpx;
				font-weight: bold;
				color: #333;
				margin-bottom: 20rpx;
			}
			
			.slogan {
				font-size: 28rpx;
				color: #666;
			}
		}
		
		.copyright {
			padding: 40rpx 0;
			text-align: center;
			
			text {
				font-size: 24rpx;
				color: #999;
			}
		}
	}
</style> 